﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace Croupier_iteration_1.Model.Jeu
{
    public class JeuDeCartes : ITirage
    {
        public IEnumerable<Carte> CartesJeu { get; set; }
        static Random rnd = new Random();

        public JeuDeCartes()
        {
            CartesJeu = new List<Carte>();
        }

        public JeuDeCartes(List<Carte> cartes)
        {
            CartesJeu = cartes;
        }


        public Carte Tirer()
        {
            Carte carteTiree;
            carteTiree = new Carte();
            //random de ma liste de carte;
            

            carteTiree = CartesJeu.ElementAt(rnd.Next(CartesJeu.Count()));
            return carteTiree;
        }
    }
}
